<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width>, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        //超时定时器
    var t1=setTimeout(function(){
        conlsole.log("1s时间到了")
    },3.3000)
    //间隔定时器
    var t2=setInterval(function()  {
        conlsole.log("1s时间到了")
    }, 1000);
    //关闭定时器
    clearInterval(t1)
    clearTimeout(t2)
    //如何定时一秒输出1-9
    var i =0;
    var t3=setInterval(function(){
        console.log(i++);
        if(i>9){
            clearInterval(t3)
        }
    },1000)
    </script>
</body>
</html>